inf2301fandomcom-20200213-history
Høst 06
='HØST 06'= 'Oppgave 1' A) Assuming no packet loss. Processing delay:''' ''This delay covers the time taken to process the header, checking integrity by calculating checksums and bit-level errors. Queuing delay: ''This is the time it takes from the packets are transmitted until the first packet reaches the link. ''Transmission delay: ''Transmission is the time it takes to push all the packets bits from the router to the link. ''Propagation delay: ''This is the time required to transmit packets from router A (from the beginning of the link) and to router B. ''B) 'Application Layer' Service models: API forwarded to applications for end-users. Packet formats: Message formats defined by a application protocol, generally a string. Addressing: Addressing is done through sockets. Sockets are bound to a host identifier and a process identifier; on the Internet, IP is the host identifier and a port works as a process identifier. 'Transport Layer' Service models: Two main services: - Multiplexing and demultiplexing: Translating host-to-host communication to process-to-process (demultiplexing), and the other way around (multiplexing) - Integrity checking: A checksum is calculated to ensure integrity Four other possible services: - Reliable Data Transfer - In-order packet delivery - Throughput: can guarantee a certain level of throughput - Timing: 'guaranteed arrival within a certain time (practically impossible) - '''Security: '''for example encryption of the data transferred ''Packet formats: Messages encapsulated with the headers of the given transport layer protocol – namely a SEGMENT. Minimum requirement: '''Dest port #, src port #, length of message, checksums and the actual message Addressing: Destination and source ports. 'Network Layer' Service models: Packet routing Host-to-host delivery Four other possible services (almost never supported): - Reliable Data Transfer - In-order packet delivery - Throughput: can guarantee a certain level of throughput - Timing: 'guaranteed arrival within a certain time (practically impossible) - '''Security: '''for example encryption of the data transferred The infamously known Internet Protocol (IP) lies within this layer, but does not support anything except packet routing and host-to-host delivery. ''Packet formats: Datagrams – Encapsulated header of the actual network layer protocol and the segment. Addressing Addressing downwards is the host identifier (IP), and upwards the each packet is tagged with a header that contains the meta-data for the purpose of delivery '''Link Layer Service models: Node-to-Node transport: '''Adjacent link transport between routers. '''Framing: '''Building frames to be sent through the links '''Half-duplex Full-duplex Flow Control Error detection Packet formats: Frame: A digital data transmission unit or data packet that includes frame synchronization, i.e. a sequence of bits or symbols making it possible for the receiver to detect the beginning and end of the packet in the stream of symbols or bit''s. Addressing: ''MAC address: Theoretically unique physical address for each networking unit. 'Physical Layer Hardware for sending the actual bits: - Twisted pair copper cable: - Fiber - Coaxial cable - Over the air transfer C) Persistent HTTP connection is a connection that stays alive after a request, whilst a non-persistent connection closes between each request. When it comes to pipelining, multiple HTTP requests are sent without waiting for a reply for each request. In persistent connections it reduces the time a server uses to return all requests. 'Oppgave 2' '''''A) Go-Back-N: N is defined as the number of packets allowed within a window. The receiver expects packets in order, refusing packets that don’t have the next expected sequence number. When the sender detects a loss, it will go back to the first unacknowledged packet and retransmit all packets since. Note that the receiver actually discards out-of-order packets, which simplifies ordered buffering of received packets, but could mean that many packets are retransmitted unnecessarily. Selective Repeat: ''SR protocols avoid unnecessary retransmissions by having the sender only retransmit packets that are actually lost. Buffering up packets received out of order, after acking the sender, does this. When the awaited packet arrives, the buffered packets are sent through. '''B)' Congestion is when a router suffers from packet loss due to spam from clients, flow control protects the buffer of the receiver from overflowing. C) The timeout value is calculated through three different variables: - SampleRTT: Once per RTT - EstimateRTT: The previous estimate and the sample – vektet gjennomsnitt - DevRTT: Deviation of the sampleRTT between estimateRTT TimeoutInteverval = EstimatedRTT + 4 * DevRTT 'Oppgave 3' A) 129.242.17.219/29 -' /29 indicates that the 29 first bits make out the subnet address, whilst the 3 last bits defines the host address. B) In a VC network routers need to keep track of each connection, done through a routing table of links and VC numbers. In a datagram network a host constructs a packet containing a source and destination address, this packet is sent to the nearest network device, which in turn passes the packet on. Routers build forwarding tables within a given interval, these tables keep track of the adjacent links. C) Link-state algorithms are global algorithms, and thus all link costs are known at runtime. This is done by each node broadcasting link-state packages to all other nodes, with the contents of these packages being the identities and costs of its attached links. Each node uses this information to find the same set of least-cost paths. Dijsktra’s algorithm is often used to calculate the shortest paths from one node to another. The complexity of this algorithm is http://images.wikia.com/wikitex/images/9/91/919/e2269f8a9f085f8b484fcabd024521.png Being a decentralized algorithm, the DV algorithm is iterative, asynchronous and distributed. It is distributed because each node receives some information directly from its attached neighbors, and distributes the results of the calculations performed back to the neighbors. I iterates until all information is exchanged. Since it does not need the nodes to operate in lockstep with each other, the algorithm is asynchronous. The DV algorithm is suitable for networks with a rapid topology changes and because of its distributed nature, has a lower complexity than the LS algorithm since it does not need to inform all nodes in the network of the changes made. It works by first waiting until a link cost change to a neighbor is changed or until it receives a distance vector from a neighbor. The distance vector is then updated for all destinations from the node to all nodes, and if the distance vector changes as a result of this update, the node sends its new distance vector to all neighbors. When it comes to comparing LS and DV, the low complexity of DV makes it preferable in bigger networks with a lot of topological changes, whilst LS is more robust. The reason why LS is more robust, is that sabotaging a router in a network using LS routing algorithms will only tamper with the link costs of the sabotaged router, while using DV would lead to iteratively spreading the false information. 'Oppgave 4' '''''B) 'Oppgave 5' ''B) '' Category:Alle Category:Eksamensoppgaver